package org.example.builder;

/**
 * @author Zhang Yu
 * @description: 具体建造者2
 * @date 2024/5/20 13:44
 */
public class ConcreteBuilder2 extends Builder{

    @Override
    public void buildPart1() {
        product.setPart1("builder 2 set part 1.");
    }

    @Override
    public void buildPart2() {
        product.setPart2("builder 2 set part 2.");
    }

    @Override
    public void buildPart3() {
        product.setPart3("builder 2 set part 3.");
    }

    @Override
    public Product getProduct() {
        System.out.println("builder 2 build product.");
        return product;
    }
}
